package cn.nbt.busManage.controller;

import cn.nbt.busManage.dao.repository.PointRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * {@code @Author} lyq
 * {@code @Date} 6/6/2024 10:05 PM
 */

@Controller
public class TestController {
    @Autowired
    private PointRepository pointRepository;
    @RequestMapping("/hello")
    public String hello(Model model) {
        model.addAttribute("message", "Hello, Spring MVC!");
        System.out.println("==>HelloWordController1");
        return "/META-INF/resources/index.html";  // This should correspond to a JSP file in /WEB-INF/views/
    }

    @RequestMapping("/hello1")
    @ResponseBody
    public String hello1() {
        System.out.println("==>HelloWordController2");
        return "hello";
    }

    @RequestMapping("/hello2")
    public String hello(){
        System.out.println("==>HelloWordController33");
        return "hello";
    }
}
